package com.app;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;

public class AppBeanNameGenerator extends AnnotationBeanNameGenerator{

	public String generateBeanName(BeanDefinition arg0,
			BeanDefinitionRegistry arg1) {
		String name = super.generateBeanName(arg0, arg1);
		if (name != null && name.indexOf("Impl") > 0) {
			return name.substring(0, name.indexOf("Impl"));
		}
		return name;
	}

}
